ds_list_empty

语法:

ds_list_empty(id);


参数 描述
id 要检查的数据结构的id。


返回: 布尔值


描述

With this function you can check the given ds_list to see if it is empty (returns true) or not (returns false).


例如:

if count == 15 && !ds_list_empty(command_list)
   {
   ds_list_clear(command_list);
   alarm[0] = room_speed;
   count = 0;
   }

以上代码首先判断了count这个值是不是等于15同时判断了command_list是否有内容,如果两个条件同时满足就会执行清除command_list列表中所有的内容的操作,同时会设置一个倒计时并把ai_count的值设为0。


上一页: DS Lists
下一页: ds_list_size
© Copyright YoYo Games Ltd. 2018 All Rights Reserved